package com.jh.browser.adapter;

import com.jh.browser.bean.ConsoleMessageBean;
import com.jh.browser.holder.ConsoleMessageHolder;
import com.jh.browser.holder.MyBaseViewHolder;

import java.util.ArrayList;

public class ConsoleMessageAdapter extends MyBaseAdapter<ConsoleMessageBean> {
    public ConsoleMessageAdapter(ArrayList<ConsoleMessageBean> data) {
        super(data);
    }

    @Override
    public void initView(ConsoleMessageBean item, MyBaseViewHolder viewHolder) {
        ConsoleMessageHolder consoleMessageHolder = (ConsoleMessageHolder) viewHolder;
        consoleMessageHolder.tv_messageLevel.setText(item.messageLevel);
        consoleMessageHolder.tv_message.setText(item.message);
        consoleMessageHolder.tv_lineNumber.setText("行号：" + item.lineNumber);
    }

    @Override
    public ConsoleMessageHolder getHolder() {
        return new ConsoleMessageHolder();
    }
}
